home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-19 | 1.7 KB | 59 lines | [TEXT/MMCC] |
- //
- // CTCPApplicationPP.h
- //
- // TurboTCP library
- // Application mix-in class
- // PowerPlant-specific class
- //
- // Copyright © 1993-95, FrostByte Design / Eric Scouten
- //
-
- #pragma once
-
- #include "TurboTCP.buildflags.h"
-
- #if !TurboTCP_PP
- #error: This file should be used with PowerPlant projects only!
- #endif
-
- #include <LAttachment.h>
- class LApplication;
-
-
- //***********************************************************
-
- class CTCPApplicationPP : public LAttachment {
-
- // This mix-in class should be used with an LApplication or LDocApplication. It hooks
- // into the event loop to handle MacTCP events which were queued at interrupt time, and
- // takes care of opening and closing the MacTCP driver at the appropriate times.
-
- // NOTE: It is highly recommended that you enable background processing by turning on
- // the “Background Null Events” SIZE resource flag. See the Set Project Type… dialog
- // under the Project menu.
-
- // By default, TurboTCP sets the maximum sleep time to 90 ticks (1.5 seconds). Feel free
- // to modify this behavior. However, I recommend that you use a setting somewhat lower
- // than TCL’s default of 600 ticks (10 seconds). You may wish to use a lower value for
- // high-performance applications, or a higher value to be more MultiFinder-friendly.
-
-
- public:
- CTCPApplicationPP(LApplication* inApplication);
- virtual ~CTCPApplicationPP();
-
- // event-loop tap
-
- protected:
- virtual void ExecuteSelf(MessageT inMessage, void* ioParam);
-
-
- // data members
-
- LApplication* mApplication; // the application object we’re attached to
- short mMaxTCPEvents; // maximum number of TCP events to process
- long mMaxTCPTicks; // maximum ticks to spend in TCP event loop
-
-
- };
-